package com.summer.framework.system.error;

import com.summer.framework.base.result.ResultError;
import lombok.Getter;

/**
 * Description:
 *
 * @auther Ice Yang
 * Date 2025/9/18 16:43
 */
@Getter
public enum SystemError implements ResultError {
    //用户名已经存在
    USERNAME_EXIST(20001, "用户名已经存在", "username.exist"),
    //字典类型已经存在
    CATEGORY_TYPE_EXIST(20002, "字典类型已经存在", "category.type.exist"),
    // 字典类型不存在
    CATEGORY_TYPE_NOT_EXIST(20003, "字典类型不存在", "category.type.not.exist"),
    // 字典类型明细为空
    CATEGORY_TYPE_DETAIL_EMPTY(20004, "字典类型明细为空", "category.type.detail.empty"),
    ;

    private final int code;
    private final String message;
    private final String key;

    SystemError(int code, String message, String key) {
        this.code = code;
        this.message = message;
        this.key = key;
    }
}
